package com.zte.purchase.dao;

import com.zte.purchase.model.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface IPurchaseDao {

    boolean addOnePurchase(CPurchaseAndDetails cPad);

    boolean addOneDetails(CDetails details);

    boolean deleteOnePurchase(String purchaseId);

    boolean deleteDetails(String purchaseId);

    boolean updatePurchaseAndDetails(CPurchaseAndDetails cPau);

    boolean updateOnePurchase(CPurchase cPurchase);

    boolean updateOneDetails(CDetails details);

    public CPurchaseAndDetails queryPurchaseAndDetails(String purchaseId);

    List<CPurchase> queryCDetailsByPC(PurchaseCondition conn);

    CDetails2 queryDetail2(String pId);

    List<UpdateBrand> queryAllBrandsU();

    List<UpdateType> queryTypesU();

    List<UpdateProduct> queryProductsU();

    UpdateFirm queryFirmU();


    int updatePurppppp(UpdataSave updataSave);

    int updateDettttt(UpdataSave updataSave);
}
